import { createStore,createLogger } from "vuex";
import menu from "./modules/menu";
import tags from "./modules/tags";
import chat from "./modules/chat";


const store = createStore({
    modules:{
        menu,
        tags,
        chat
        
    }
})
store.watch(function (state) {
    return state.chat.sessions
  },function (val) {
    console.log('CHANGE: ', val);
    localStorage.setItem('vue-chat-session', JSON.stringify(val));
  },{
    deep:true/*这个貌似是开启watch监测的判断,官方说明也比较模糊*/
  })
  

export default store
